const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token, // token值快捷访问
  name: state => state.user.userInfo.username, // 建立用户名称的映射
  userId: state => state.user.userInfo.userId, // 建立用户id的映射
  staffPhoto: state => state.user.userInfo.staffPhoto, // 快捷访问用户的头像
  routes: state => state.permission.routes, // 快捷访问所有的路由对象数组
  roles: state => state.user.userInfo.roles, // 快捷访问当前用户拥有的所有角色
  companyName: state => state.user.userInfo.companyName, // 快捷访问当前用户所处的公司
  departmentName: state => state.user.userInfo.departmentName // 快捷访问当前用户所处的公司的等级
}
export default getters
